# coding:utf-8
import requests
import json

text = 'hhh'


def send_request(text):
    url = 'http://127.0.0.1:8000/backend/comment_check/'
    data = {'user_id': 1, 'p_id': 1,'text':text}
    data = json.dumps(data)
    """
    Json 格式
    用户id，文物id，评论内容
    {
    "user_id" : JS number
    "p_id": JS number
    "text" : JS string
    }
    """
    response = requests.post(url=url, data=data)
    # response = requests.post(url=url,data=data)
    print(response.json())

send_request(text)